package fr.cnam.ratpProject.client.utils;

import com.google.gwt.activity.shared.AbstractActivity;
import com.google.gwt.event.shared.EventBus;
import com.google.gwt.place.shared.Place;
import com.google.gwt.user.client.ui.AcceptsOneWidget;
import com.google.gwt.user.client.ui.IsWidget;


public abstract class RatpActivity extends AbstractActivity{
	
	@Override
	public abstract void start(AcceptsOneWidget panel, EventBus eventBus) ;
	
	protected Place here =  GlueProvider.INSTANCE.getPlaceController().getWhere();
	
	protected void attachView(AcceptsOneWidget panel, IsWidget view)
	{
		panel.setWidget(view);
	}
	
	/**
     * Navigate to a new Place in the browser
     */
	public void goTo(Place place) {
        GlueProvider.INSTANCE.getPlaceController().goTo(place);
    }

}
